#ifndef CLOUDPLATFORM_H
#define CLOUDPLATFORM_H

#include <QWidget>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QStandardItemModel>
#include <QHttpMultiPart>
#include <QHttpPart>


namespace Ui {
class CloudPlatform;
}

class CloudPlatform : public QWidget
{
    Q_OBJECT

public:
    explicit CloudPlatform(QWidget *parent = nullptr);
    ~CloudPlatform();

    QNetworkAccessManager *	m_netManager,*m_pHttpMgr,*m_executeMgr;     //定义网络请求对象
    QNetworkReply *			m_pReply;           //请求包的返回值
    QStandardItemModel *m_model;
    QString  m_urlAddr;
    void ReadExcel(QString strFileName);
    int HttpPostFileUpload(const QString p_sUploadDirPath/*文件路径*/, QString &p_sReturnData/*返回数据*/);
    void uploadHttpFile();

private slots:
    void on_btn_impData_clicked();

    void on_btn_checkData_clicked();

    void on_btn_executeData_clicked();

    void slotError();

    void replyFinished(QNetworkReply *reply);

    void executeReplyFinished(QNetworkReply *reply);

private:
    Ui::CloudPlatform *ui;
};

#endif // CLOUDPLATFORM_H
